﻿#pragma once

#include "common_data.h"

#include "json_trans.h"

structJ(HalConfig,
	mapping(QString, robot);
	mapping(QString, camera);
	mapping(QString, door);
	mapping(QString, grating);
	mapping(QString, light);
	mapping(QString, locker);

	prop(&robot, &camera, &door, &grating, &light, &locker);
);

structJ(SoftConfig,
	mapping(QString, robot);
mapping(QString, camera);
mapping(QString, door);
mapping(QString, grating);
mapping(QString, light);
mapping(QString, locker);

prop(&robot, &camera, &door, &grating, &light, &locker);
);

structJ(AreaConfig,
	mapping(PositionJ, min);
	mapping(PositionJ, max);
	prop(&min, &max);
);


structJ(RobotCfg,
	mapping(QString, name);
	mapping(int, brand);
	mapping(QString, ip);
	mapping(int, statePort);
	mapping(int, cmdPort);
	mapping(PositionJ, origin);
	mapping(QList<AreaConfig>, forbidden);
	prop(&name, &brand, &ip, &statePort, &cmdPort, &origin, &forbidden);
);


